package GameDemo.FightState.AllState;

import GameDemo.Actor;
import com.EventSystem;


 //StateMutexType.None != mutexType 表示互斥状态。 多种StateMutexType的状态，只能一个生效。
public abstract class BaseMutexState extends BaseFightState{
    private StateMutexType mutexType = StateMutexType.AddHp;

    public BaseMutexState(Actor owner, StateMutexType mutexType) {
        super(owner);
        this.mutexType = mutexType;
        owner.fightStateMgr.AddMutexState(this);
    }

    public void Destroy() {
        owner.fightStateMgr.RemoveMutexState(this);
        super.Destroy();
    }

    public StateMutexType GetMutexType() {
        return mutexType;
    }

    public abstract void OnActivate();

    public void OnDeactivate() {
        eventReg.Destroy();
    }
    
    public abstract long Priority(); //优先级，越大越优先
}
